(global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/public/poster/children/sh-invite-poster" ], {
    "0ae6": function(t, e, n) {},
    3623: function(t, e, n) {
        n.r(e);
        var r, a = n("8c9d"), o = n("e2b3");
        for (r in o) "default" !== r && function(t) {
            n.d(e, t, function() {
                return o[t];
            });
        }(r);
        n("5926");
        var i = n("f0c5"), a = Object(i.a)(o.default, a.b, a.c, !1, null, null, null, !1, a.a, void 0);
        e.default = a.exports;
    },
    "49a7": function(t, a, u) {
        (function(t) {
            Object.defineProperty(a, "__esModule", {
                value: !0
            }), a.default = void 0;
            var r = n(u("a34a")), o = n(u("a23b")), i = u("99e8"), e = u("26cb");
            function n(t) {
                return t && t.__esModule ? t : {
                    default: t
                };
            }
            function s(t, e, n, r, a, o, i) {
                try {
                    var c = t[o](i), s = c.value;
                } catch (t) {
                    return n(t), 0;
                }
                c.done ? e(s) : Promise.resolve(s).then(r, a);
            }
            function c(e, t) {
                var n, r = Object.keys(e);
                return Object.getOwnPropertySymbols && (n = Object.getOwnPropertySymbols(e), t && (n = n.filter(function(t) {
                    return Object.getOwnPropertyDescriptor(e, t).enumerable;
                })), r.push.apply(r, n)), r;
            }
            n(u("e2cb"));
            e = {
                components: {},
                mixins: [ "shoproShare" ],
                data: function() {
                    return {
                        poster: {},
                        qrShow: !1,
                        canvasId: "invite_poster",
                        showShareGuide: !1
                    };
                },
                props: {},
                computed: function(r) {
                    for (var t = 1; t < arguments.length; t++) {
                        var a = null != arguments[t] ? arguments[t] : {};
                        t % 2 ? c(Object(a), !0).forEach(function(t) {
                            var e, n;
                            e = r, t = a[n = t], n in e ? Object.defineProperty(e, n, {
                                value: t,
                                enumerable: !0,
                                configurable: !0,
                                writable: !0
                            }) : e[n] = t;
                        }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(r, Object.getOwnPropertyDescriptors(a)) : c(Object(a)).forEach(function(t) {
                            Object.defineProperty(r, t, Object.getOwnPropertyDescriptor(a, t));
                        });
                    }
                    return r;
                }({}, (0, e.mapState)({
                    userInfo: function(t) {
                        return t.user.userInfo;
                    },
                    shareData: function(t) {
                        return t.init.initData.share;
                    }
                })),
                created: function() {
                    var t = this;
                    t.setShareInfo(), t.shareInfo && setTimeout(function() {
                        t.$emit("getShareInfo", t.shareInfo), t.scene = encodeURIComponent(t.shareInfo.path.split("?")[1]), 
                        t.shareFc();
                    }, 100);
                },
                methods: {
                    shareFc: function() {
                        var c, n = this;
                        return c = r.default.mark(function t() {
                            var a, e;
                            return r.default.wrap(function(t) {
                                for (;;) switch (t.prev = t.next) {
                                  case 0:
                                    return a = n, t.prev = 1, console.log("准备生成:" + new Date()), t.next = 5, (0, i.getSharePoster)({
                                        _this: n,
                                        backgroundImage: a.$tools.checkImgHttp(a.shareData.user_poster_bg),
                                        formData: {},
                                        posterCanvasId: n.canvasId,
                                        delayTimeScale: 20,
                                        drawArray: function(t) {
                                            var n = t.bgObj, r = (t.type, t.bgScale, n.width, .042 * n.width);
                                            return n.height, new Promise(function(t, e) {
                                                t([ {
                                                    type: "image",
                                                    url: a.$tools.checkImgHttp(a.userInfo.avatar),
                                                    alpha: 1,
                                                    dx: .5 * n.width - .16 * n.width / 2,
                                                    dy: .16 * n.width,
                                                    infoCallBack: function(t) {
                                                        var e = .16 * n.width / t.height;
                                                        return {
                                                            circleSet: {
                                                                x: t.width * e / 2,
                                                                y: .16 * n.width / 2,
                                                                r: .16 * n.width / 2
                                                            },
                                                            dWidth: t.width * e,
                                                            dHeight: .16 * n.width
                                                        };
                                                    }
                                                }, {
                                                    type: "text",
                                                    text: a.userInfo.nickname,
                                                    size: r,
                                                    color: "black",
                                                    alpha: 1,
                                                    textAlign: "middle",
                                                    textBaseline: "middle",
                                                    infoCallBack: function(t) {
                                                        return o.default.log("index页面的text的infocallback ，textlength:" + t), {
                                                            dx: .5 * n.width - .5 * t,
                                                            dy: .42 * n.width
                                                        };
                                                    },
                                                    serialNum: 0,
                                                    id: "tag1"
                                                }, {
                                                    type: "image",
                                                    url: "".concat(a.$API_URL, "wechat/wxacode?scene=").concat(a.scene),
                                                    alpha: 1,
                                                    drawDelayTime: 500,
                                                    dx: .5 * n.width - .26 * n.width / 2,
                                                    dy: .855 * n.width,
                                                    infoCallBack: function(t) {
                                                        return {
                                                            dWidth: .26 * n.width,
                                                            dHeight: .26 * n.width
                                                        };
                                                    }
                                                } ]);
                                            });
                                        },
                                        setCanvasWH: function(t) {
                                            var e = t.bgObj;
                                            t.type, t.bgScale, n.poster = e;
                                        }
                                    });

                                  case 5:
                                    e = t.sent, n.$set(n.poster, "finalPath", e.poster.tempFilePath), n.qrShow = !0, 
                                    t.next = 15;
                                    break;

                                  case 10:
                                    t.prev = 10, t.t0 = t.catch(1), o.default.hideLoading(), o.default.showToast(JSON.stringify(t.t0)), 
                                    console.log(JSON.stringify(t.t0));

                                  case 15:
                                  case "end":
                                    return t.stop();
                                }
                            }, t, null, [ [ 1, 10 ] ]);
                        }), function() {
                            var t = this, i = arguments;
                            return new Promise(function(e, n) {
                                var r = c.apply(t, i);
                                function a(t) {
                                    s(r, e, n, a, o, "next", t);
                                }
                                function o(t) {
                                    s(r, e, n, a, o, "throw", t);
                                }
                                a(void 0);
                            });
                        }();
                    },
                    saveImage: function() {
                        var e = this;
                        "wxOfficialAccount" === t.getStorageSync("platform") ? e.$tools.toast("长按图片保存") : t.saveImageToPhotosAlbum({
                            filePath: e.poster.finalPath,
                            success: function(t) {
                                e.$tools.toast("保存成功");
                            },
                            fail: function(t) {
                                e.$tools.toast("保存失败");
                            }
                        });
                    },
                    share: function() {},
                    copyLink: function() {
                        t.setClipboardData({
                            data: this.shareInfo.copyLink,
                            success: function() {}
                        });
                    },
                    hideQr: function() {
                        this.qrShow = !1;
                    }
                }
            };
            a.default = e;
        }).call(this, u("543d").default);
    },
    5926: function(t, e, n) {
        var r = n("0ae6");
        n.n(r).a;
    },
    "8c9d": function(t, e, n) {
        n.d(e, "b", function() {
            return r;
        }), n.d(e, "c", function() {
            return a;
        }), n.d(e, "a", function() {});
        var r = function() {
            this.$createElement;
            this._self._c;
        }, a = [];
    },
    e2b3: function(t, e, n) {
        n.r(e);
        var r, a = n("49a7"), o = n.n(a);
        for (r in a) "default" !== r && function(t) {
            n.d(e, t, function() {
                return a[t];
            });
        }(r);
        e.default = o.a;
    }
} ]), (global.webpackJsonp = global.webpackJsonp || []).push([ "pages/public/poster/children/sh-invite-poster-create-component", {
    "pages/public/poster/children/sh-invite-poster-create-component": function(t, e, n) {
        n("543d").createComponent(n("3623"));
    }
}, [ [ "pages/public/poster/children/sh-invite-poster-create-component" ] ] ]);